import sympy

def fun():
    x1 = sympy.Symbol("x1")
    x2 = sympy.Symbol("x2")
    y = x1 ** 3 + x1 * x2 + x2
    print(sympy.diff(y, x1))
    print(sympy.diff(y, x2))


if __name__ == '__main__':
    fun()
